import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {path:"/",name:"home",redirect:"/home",component:()=>import("@/layout/index.vue"),
      children:[
        {path:"/home",component:()=>import("@/views/home/index.vue")}
      ]
    },
    {path:"/login",name:"login",component:()=>import("@/views/login/index.vue"),
     
      
    },
     {path:"/banner",
      name:"banner",
      redirect:'/banner/list',
      component:()=>import("@/layout/index.vue"),
      children:[
        {path:"/banner/list",
      redirect:"/banner/list/home",
          component:()=>import("@/views/banner/index.vue"),
         children:[
            {path:"/banner/list/home",component:()=>import("@/views/banner/components/BannerHome.vue")},
            {path:"/banner/list/kind",component:()=>import("@/views/banner/components/BannerKind.vue")}
         ]}
      ]
     },
      {path:"/account",name:"account",component:()=>import("@/layout/index.vue"),
        children:[
          {path:"/account/list",component:()=>import("@/views/account/index.vue")}
        ]
      },
  ],
})

export default router
